<template>
    <div style="
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    background-color:honeydew;
    ">
        <div style="
        width: 100%;
        height: 10%;
        background-color: white;
        text-align: center;
        display: flex;
        justify-content: center;">
            <el-text style="font-size: 20px;" type="danger">已处于管理员模式</el-text>
        </div>
        <div style="
        display: flex;
        width: 80%;
        height: 80%;
        margin-top: 20px;
        ">
            <div style="width:20%;height: 100%;">
                <!--aside-->
                <el-menu style="height: 100%;">
                    <el-menu-item 
                    @click="()=>{router.replace('/admin/profile');}">
                        <span>管理员信息</span>
                    </el-menu-item>
                    <el-menu-item 
                    @click="()=>{router.replace('/admin/gamelist');}">
                        <span>编辑游戏列表</span>
                    </el-menu-item>
                    <el-menu-item 
                    @click="OnExitAdmin">
                        <span>退出管理员</span>
                    </el-menu-item>
                </el-menu>
            </div>
            <div style="
            width: 80%;
            height: 100%;
            background-color: white;
            ">
                <RouterView></RouterView>
            </div>
        </div>
    </div>

    
</template>
<script setup>
import {RouterView } from 'vue-router';
import router from '@/router';

function OnExitAdmin(){
    router.replace('/');
    //标记管理员已退出
}
</script>